package com.cn.wang.demo;

import java.util.Comparator;


@SuppressWarnings("rawtypes")
public class PersonComparators implements Comparator{
	
	@Override
	public int compare(Object o1, Object o2) {
		Person p1 = (Person) o1; 
		Person p2 = (Person) o2; 
		return p2.getAge()-p1.getAge();
	}
}
